package com.xianxian.user.controller;

import com.xianxian.user.model.dto.DepartmentTreeDTO;
import com.xianxian.user.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 描述：
 *
 * @author zhang
 *
 */
@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;


    @GetMapping("/getTree")
    public List<DepartmentTreeDTO> getDeptTree(){
        return departmentService.getTree();
    }


}
